<template>
  <TestComChild :field-name="fieldName"></TestComChild>
</template>
<script setup lang="ts">
import {ref, provide, onMounted} from "vue";
import TestComChild from "@/components/test/TestComChild.vue";
import axios from "axios";

const fieldName = ref("姓名");
const fieldVal = ref("steven");

const fieldConfig = ref([{
  fieldName: "年龄",
  fieldVal: 20
}]);
provide("fieldVal", fieldVal);
provide("fieldConfig", fieldConfig);

onMounted(() => {
  axios.get("/api/getData").then((res) => {
    console.log(res.data);
  });
});

</script>
<style scoped lang="scss">

</style>
